import 'package:flutter/material.dart';
import 'font/MyIcon.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: false,
        primarySwatch: Colors.yellow,
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text("Flutter App")),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    //ListView组件
    return ListView(
      children: const <Widget>[
        ListTile(     //ListTile,简单的列表元素组件
          leading: Icon(Icons.home,color: Colors.black12,),   //前置widget
          title: Text("我是一个标题"),  //标题
          trailing: Icon(Icons.chevron_right_sharp),          //后置widget
        ),
        Divider(),
        ListTile(
          leading: Icon(Icons.assignment,color: Colors.red,),
          title: Text("全部订单"),
          trailing: Icon(Icons.chevron_right_sharp),
        ),
        Divider(),
        ListTile(
          leading: Icon(Icons.payment,color: Colors.green,),
          title: Text("待付款"),
          trailing: Icon(Icons.chevron_right_sharp),
        ),
        Divider(),
        ListTile(
          leading: Icon(Icons.favorite,color: Colors.lightGreen,),
          title: Text("我的收藏"),
          trailing: Icon(Icons.chevron_right_sharp),
        ),
        Divider(),
        ListTile(
          leading: Icon(Icons.person,color: Colors.black54,),
          title: Text("在线客服"),
          trailing: Icon(Icons.chevron_right_sharp),
        ),
        Divider(),
      ],
    );
  }
}
